package com.xixibaby.core;

/**
 * @author tomj
 * 业务异常类
 */
public class BusException extends RuntimeException {
    private Integer errorCode;

    public BusException(String message){
        super(message);
        this.setErrorCode(ResultCode.VALIDATE_FAILED.getCode());
    }

    public BusException(Integer errorCode, String message){
        super(message);
        this.setErrorCode(errorCode);
    }


    public Integer getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }

}
